#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

void copy(int a[], int b[], int size)
{
	for (int i = 0; i < size; i++)
	{
		b[i] = a[i];
	}
}

int main()
{
	int n, m, size;
	cin >> n >> m >> size;
	int a[100] = { 0 };
	int b[100] = { 0 };
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	for (int j = 0; j < m; j++)
	{
		cin >> b[j];
	}
	copy(a, b, size);
	for (int j = 0; j < m; j++)
	{
		cout << b[j] << ' ';
	}
	return 0;
}